#pragma once
#include "d3d9.h"
#include "d3dx9.h"

class CCamera
{
	
public:	
	
	enum CameraType { LANDOBJECT, AIRCRAFT };

	CCamera(void);
	CCamera(CameraType camType);
	~CCamera(void);

	void strafe(float fUnits);		// Left/ Right
	void fly(float fUnits);				// Up/ Down
	void walk(float fUnits);			// Forward/ Backward

	void pitch(float fAngle);
	void yaw(float fAngle);
	void roll(float fAngle);

	void Initialize(IDirect3DDevice9* device);
	void GetViewMatrix(D3DMATRIX* v);
	void SetCameraType(CameraType camType) { m_CameraType = camType; }
	void SetPosition(D3DXVECTOR3 pos) { m_pos = pos; }

	void GetPos(D3DXVECTOR3 *pos)  { *pos = m_pos; }
	
private:
	CameraType	m_CameraType;
	D3DXVECTOR3		m_right;
	D3DXVECTOR3		m_up;
	D3DXVECTOR3		m_look;
	D3DXVECTOR3		m_pos;
};
